<template>
    <el-popconfirm
        @onCancel="$emit('del')"
        cancelButtonText="删除"
        cancelButtonType="danger"

        confirmButtonText="我再想想"
        confirmButtonType="primary"

        icon="el-icon-info"
        iconColor="red"
        title="管理员也不能恢复，确定删除吗？">
        <template v-slot:reference>
            <el-button :type="type" class="danger">删除</el-button>
        </template>
    </el-popconfirm>
</template>

<script>
export default {
    name: 'del-button',
    emits: ['del'],
    props: {
        type: {
            type: String,
            default: 'text'
        }
    }
}
</script>

<style lang="less" scoped>
.danger {
    color: red;
}
</style>
